import os
import sys
import traceback
import pandas as pd
from PyQt5.QtWidgets import QAbstractItemView, QPushButton, QApplication, QMainWindow, QWidget, QTableWidgetItem, QHeaderView, QComboBox, QFrame, QTableWidget
from PyQt5.QtCore import QUrl, Qt, QStringListModel, QModelIndex, pyqtSignal, QTimer
from loguru import logger

from body_app_main import Ui_MainWindow
from body_aside import Ui_Body_Aside
from body_foot import Ui_Body_Foot
from body_main import Ui_Body_Main


class MainWindow(QMainWindow, Ui_MainWindow):
    
    def __init__(self,parent = None):
        super(MainWindow, self).__init__(parent)
        self.setupUi(self)   
        
        self.main_frame = Body_Main(self.centralwidget)
        self.foot_frame = Body_Foot(self.centralwidget)
        self.aside_frame = Body_Aside(self.centralwidget)
        
        self.main_body.addWidget(self.main_frame)
        self.foot_body.addWidget(self.foot_frame)
        self.aside_left.addWidget(self.aside_frame)


class Body_Aside(QFrame, Ui_Body_Aside):
    
    def __init__(self, parent: QWidget | None = ...) -> None:
        super().__init__(parent)
        self.setupUi(self)

class Body_Foot(QFrame, Ui_Body_Foot):
    
    def __init__(self, parent: QWidget | None = ...) -> None:
        super().__init__(parent)
        self.setupUi(self)

class Body_Main(QFrame, Ui_Body_Main):
    
    def __init__(self, parent: QWidget | None = ...) -> None:
        super().__init__(parent)
        self.setupUi(self)


if __name__ == "__main__":
    app = QApplication(sys.argv)
    main = MainWindow()
    main.show()
    sys.exit(app.exec_())